package com.supply.supplymanage.controller;

import com.github.pagehelper.PageInfo;
import com.supply.supplymanage.biz.ExploitBiz;

import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.Servlet;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/exp")
public class ExploitController {

    @Resource
    private ExploitBiz exploitBiz;

    @RequestMapping("/seexpl")
    @ResponseBody
    public PageInfo seleExAll(@RequestParam("PageNum") int PageNum,
                              @RequestParam("danhao")String danhao,
                              @RequestParam("kehu") String kehu){
        System.out.println(danhao);
        PageInfo pageInfo = exploitBiz.seleExpAll(PageNum,danhao,kehu);
        return pageInfo;
    }
    @RequestMapping("upexo")
    public String upexo(@RequestParam("exid") Integer exid,
                        @RequestParam("exstate") String exstate,
                        @RequestParam("kebz") String kebz){
        exploitBiz.upexo(exid, exstate, kebz);
        return "1";
    }


}
